<template>
  <div id="app">
    <div class="bg-image-box">
      <div class="bg-image-box-content"></div>
      <img src="@/assets/images/bg.jpg" alt="bg" class="bg-image"/>
    </div>
    <Header />
    <h1 class="headline" v-reveal="{ delay: 50, distance: 12 }">Welcome to <span class="text-green-500">KBB</span></h1>
    <p class="subline" v-reveal="{ delay: 120, distance: 8 }">Join our vibrant Minecraft community and explore endless possibilities.</p>
    <main class="main-content">
      <router-view v-slot="{ Component }">
        <transition name="fade" mode="out-in" appear>
          <component :is="Component" />
        </transition>
      </router-view>
    </main>
    <Footer />
  </div>
</template>

<script>
import Header from './components/Header.vue'
import Footer from './components/Footer.vue'

export default {
  name: 'App',
  components: {
    Header,
    Footer
  }
}
</script>

<style>
#app .fade-enter-active, 
#app .fade-leave-active {
  transition: opacity 0.4s ease;
}
#app .fade-enter-from, 
#app .fade-leave-to {
  opacity: 0;
}
#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  
  
}

.headline {
  font-size: 4rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 30px;
  color: #000000;
  z-index: 1;
}

.headline span {
  color: #4CAF50;
}
.subline {
  font-size: 1.2rem;
  text-align: center;
  margin-bottom: 30px;
  color: #000000;
  z-index: 1;
}

.bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.bg-image-box-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 1;
  
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
}

.main-content {
  flex: 1;
  padding: 20px 0;
  z-index: 1;
}

/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  
  
  
  color: #374151;
  line-height: 1.5;
  font-weight: 400;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  margin: 40px 0;
  padding: 40px 0;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: bold;
  text-align: center;
  margin-bottom: 30px;
  color: #1f2937;
}

.btn-primary {
  background-color: #4CAF50;
  border-color: #4CAF50;
  color: white;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(76, 175, 80, 0.2);
}

.btn-primary:hover {
  background-color: #388e3c;
  border-color: #388e3c;
  transform: translateY(-2px);
  box-shadow: 0 8px 15px -3px rgba(76, 175, 80, 0.3);
}

/* Element Plus 组件样式覆盖 */
.el-card {
  border-radius: 16px !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important;
  transition: all 0.3s ease !important;
}

.el-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
  border-color: #4CAF50 !important;
}

.el-button {
  border-radius: 50px !important;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
}

.el-button--primary {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%) !important;
  border: none !important;
  box-shadow: 0 4px 6px -1px rgba(76, 175, 80, 0.2) !important;
}

.el-button--primary:hover {
  background: linear-gradient(135deg, #388e3c 0%, #2e7d32 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 15px -3px rgba(76, 175, 80, 0.3) !important;
}

.el-menu {
  border-bottom: none !important;
  background: transparent !important;
}

.el-menu-item {
  font-weight: 500 !important;
  transition: color 0.3s ease !important;
}

.el-menu-item:hover {
  color: #4CAF50 !important;
}

.el-menu-item.is-active {
  color: #4CAF50 !important;
  border-bottom-color: #4CAF50 !important;
}

.el-header {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid #e5e7eb !important;
}

.el-footer {
  background: white !important;
  border-top: 1px solid #e5e7eb !important;
}
</style> 